mac80211: don't compare TKIP TX MIC key in reinstall prevention
authorJohannes Berg <johannes.berg@intel.com>
Tue, 24 Oct 2017 19:12:13 +0000 (21:12 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Nov 2017 21:04:10 +0000 (21:04 +0000)
commit43af18e9fba0b179a04a344b1f08a6ecfba17bcf
tree8891ba831b28e9628f9c7e963ccca534dad2933f
parentbe4e4116797d8781e84e565cc1ccb960db20334e
mac80211: don't compare TKIP TX MIC key in reinstall prevention

For the reinstall prevention, the code I had added compares the
whole key. It turns out though that iwlwifi firmware doesn't
provide the TKIP TX MIC key as it's not needed in client mode,
and thus the comparison will always return false.

For client mode, thus always zero out the TX MIC key part before
doing the comparison in order to avoid accepting the reinstall
of the key with identical encryption and RX MIC key, but not the
same TX MIC key (since the supplicant provides the real one.)

Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name mac80211-don-t-compare-tkip-tx-mic-key-in-reinstall-.patch
net/mac80211/key.c